import request from '@/utils/request'

// 加入购物车
export const addCart = data => {
  return request ({
    method: 'POST',
    url: '/cart/add',
    data
  })
}
// 获取购物车数据
export const getCartList = params => {
  return request ({
    method: 'GET',
    url: '/cart/list',
    params
  })
}
// 修改商品个数 /cart/num
export const changeNum = data => {
  return request ({
    method: 'POST',
    url: '/cart/num',
    data
  })
}